Skip to content

Update PLIC HAL to use new autogen interface#386

Open
ziuziakowska wants to merge 1 commit intolowRISC:mainfrom
ziuziakowska:hal-autogen-rework-plic
Open

Update PLIC HAL to use new autogen interface#386
ziuziakowska wants to merge 1 commit intolowRISC:mainfrom
ziuziakowska:hal-autogen-rework-plic

Conversation

@ziuziakowska
Copy link
Copy Markdown
Contributor

Split off from #299.

@ziuziakowska ziuziakowska marked this pull request as draft March 26, 2026 16:49
@ziuziakowska ziuziakowska changed the title Update PLIC HAL to use new autogen interface [WIP] Update PLIC HAL to use new autogen interface Mar 26, 2026
@ziuziakowska ziuziakowska force-pushed the hal-autogen-rework-plic branch from 836d140 to 241d6d5 Compare April 3, 2026 16:51
@ziuziakowska ziuziakowska changed the title [WIP] Update PLIC HAL to use new autogen interface Update PLIC HAL to use new autogen interface Apr 3, 2026
@ziuziakowska ziuziakowska marked this pull request as ready for review April 3, 2026 16:53
@ziuziakowska ziuziakowska marked this pull request as draft April 3, 2026 16:54
Signed-off-by: Alice Ziuziakowska <a.ziuziakowska@lowrisc.org>
@ziuziakowska ziuziakowska force-pushed the hal-autogen-rework-plic branch from 241d6d5 to 8b853fa Compare April 3, 2026 17:01
@ziuziakowska ziuziakowska requested a review from engdoreis April 6, 2026 12:23
@ziuziakowska ziuziakowska marked this pull request as ready for review April 6, 2026 12:24
void plic_init(plic_t plic);

uint8_t plic_interrupt_priority_read(plic_t plic, uint32_t intr);
void plic_interrupt_priority_write(plic_t plic, uint32_t intrs, uint8_t prio);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These functions with intrs needs documentation, It took me time to understand that intrs is a bit mask that can contain many interrupts.


plic_interrupt_priority_set(plic, 4, 2);
if ((plic_interrupt_priority_get(plic, 4) & PLIC_PRIO_MASK) != 2) {
plic_interrupt_priority_write(plic, 4, 2);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is intr 4? Can it be added to the enum?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants